package com.yuanfeng.activity.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName ActivityShareGetRedpacketRuleController
 * @Description
 * @Author hyq
 * @Date 2023/7/11 11:55
 * @Version 1.0
 **/
@RestController
@RequestMapping("activity/redpacketRule")
public class ActivityShareGetRedpacketRuleController extends BaseController{


    /**
     * 删除分享送红包规则
     *
     * @return
     */
    @PostMapping("/delete")
    public ResponseResult deleteShareGetRp(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketRuleService.deleteShareGetRp(param);
        return result;
    }

    /**
     * 查询分享送红包规则列表
     *
     * @return
     */
    @PostMapping("/query/list")
    public ResponseResult queryShareGetRpList(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketRuleService.queryShareGetRpList(param);
        return result;
    }

    /**
     * 新增或编辑分享送红包规则
     *
     * @return
     */
    @PostMapping("/update")
    public ResponseResult updateShareGetRp(@RequestBody Map<String, Object> param) {
        ResponseResult result = activityShareGetRedpacketRuleService.updateShareGetRp(param);
        return result;
    }

}
